package cn.opopopo.design_pattern_learn.行为型.visitor;

// 表格元素
class TableElement implements DocumentElement {
    private int rows;
    private int cols;

    public TableElement(int rows, int cols) {
        this.rows = rows;
        this.cols = cols;
    }

    public int getRows() {
        return rows;
    }

    public int getCols() {
        return cols;
    }

    @Override
    public void accept(DocumentElementVisitor visitor) {
        visitor.visit(this);
    }
}